package com.zhanghe.study.springboot.controller.securityanno;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zh
 * @date 2021/8/11 11:04
 */
@RestController
@RequestMapping("/securedAnno")
public class TestSecuredController {

    @RequestMapping("/secured")
//    @Secured({"ROLE_student","ROLE_admin"})  // 用户具有哪些角色可以访问,注意要有ROLE_前缀
    public String test(){
        System.out.println("secured");
        return "test";
    }
}
